package com.zjp.mall.service.impl;

import com.zjp.mall.cache.annotation.RedisCache;
import com.zjp.mall.mapper.UserMapper;
import com.zjp.mall.pojo.User;
import com.zjp.mall.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService{

    @Autowired
    private UserMapper userMapper;


    @Override
    public User selectByOpenId(String strOpenId) {
        return userMapper.selectByOpenId(strOpenId);
    }

    @Override
    public Integer insert(User user) {
        return userMapper.insert(user);
    }

    @Override
    public void deleteThrowException() {
        throw new RuntimeException();
    }
}
